// "Copyright [2021] <Copyright Shengkai Lin>"

package cluster.optical_devices;

import cluster.*;

module OpticalTransceiverBuf {
    parameters:
        @networkNode;
        @dataplane;
    gates:
        inout out_port;
        inout nic_port;

    submodules:
        // simplebuffer_o : Buffer {}
        simplebuffer_i : Buffer {}
        opti_trans : OpticalTransceiver{}

    connections allowunconnected:
        opti_trans.out_port$o --> out_port$o;
        // opti_trans.out_port$o --> simplebuffer_o.bufferin;
        // simplebuffer_o.bufferout --> out_port$o;
        out_port$i --> opti_trans.out_port$i;

        nic_port$i --> opti_trans.nic_port$i;
        opti_trans.nic_port$o --> simplebuffer_i.bufferin;
        simplebuffer_i.bufferout --> nic_port$o;
}